<?php
/**
 * @package     gantry
 * @subpackage  features
 * @version		3.2.2 April 1, 2011
 * @author		RocketTheme http://www.rockettheme.com
 * @copyright 	Copyright (C) 2007 - 2011 RocketTheme, LLC
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 *
 * Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
 *
 */

defined('JPATH_BASE') or die();

gantry_import('core.gantryfeature');

/**
 * @package     gantry
 * @subpackage  features
 */
class GantryFeatureStyleDeclaration extends GantryFeature {
    var $_feature_name = 'styledeclaration';

    function isEnabled() {
        global $gantry;
        $menu_enabled = $this->get('enabled');

        if (1 == (int)$menu_enabled) return true;
        return false;
    }

	function init() {
        global $gantry;

        //inline css for dynamic stuff
        $css  = 'body {background:'.$gantry->get('bgcolor').';}';
        $css .= 'body a {color:'.$gantry->get('linkcolor').';}';
        $css .= '#rt-bottom  {background-color:'.$gantry->get('bottomcolor').';}';
        $css .= '#rt-footer  {background-color:'.$gantry->get('footercolor').';}';
		//$css .= '.phoneNr {background-color:'.$gantry->get('secbg').';}';
		//$css .= 'ul.modTop li a {background-color:'.$gantry->get('secbg').';}';
		$css .= '#login-form input[type=text]:focus, #login-form input[type=password]:focus  {border:1px solid '.$gantry->get('mainbg').'}';
		$css .= '#mod-search-searchword:focus {border:1px solid '.$gantry->get('mainbg').'}';
		$css .= '#closeTop {background-color:'.$gantry->get('secbg').';}
		#closeTop:hover { -moz-box-shadow: 2px 3px 6px 0px #9F9F9F; -webkit-box-shadow: 2px 3px 6px 0px #9F9F9F; box-shadow: 2px 3px 6px 0px #9F9F9F;}';
		$css .= '#bg-top {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.homepage #rt-feature .rt-container {border:2px solid '.$gantry->get('mainbg').'; border-width:2px 0 0 0;}';
		$css .= '.hometitle h3 {color:'.$gantry->get('mainbg').';}';
		$css .= '.findoutmore {background-color:'.$gantry->get('mainbg').'; }';
		$css .= 'a.readmore {background-color:'.$gantry->get('mainbg').';}';
		$css .= 'a.readmore:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= '.nspPagination li:hover, .nspPagination li.active {background:'.$gantry->get('mainbg').';}';
		$css .= '#rt-footer a {color:'.$gantry->get('mainbg').';}';
		$css .= '#gantry-totop {background-color:'.$gantry->get('mainbg').';}';
		$css .= '#gantry-totop:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= '.social-media a {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.social-media a:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= ' .imghover:hover {border: 1px solid '.$gantry->get('mainbg').'; -webkit-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';	-moz-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';	box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';}';
		$css .= '.rapid_contact .button, .readon .button {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.rapid_contact .button:hover, .readon .button:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= '.rt-articleinfo .rt-date-posted {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.rt-articleinfo .rt-author {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.portfolio-menu ul.menu li a {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.portfolio-menu ul.menu li.active a,.portfolio-menu ul.menu li a:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= '.items-row img.item-image {border: 1px solid '.$gantry->get('mainbg').'; -webkit-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';	-moz-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';	box-shadow: 0px 0px 5px '.$gantry->get('mainbg').'; }';
		$css .= '.items-row .readon {background-color:'.$gantry->get('mainbg').';}';
		$css .= '.sigplus-gallery > ul > li a:hover {border: 1px solid '.$gantry->get('mainbg').'; -webkit-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').';	-moz-box-shadow: 0px 0px 5px '.$gantry->get('mainbg').'; box-shadow: 0px 0px 5px '.$gantry->get('mainbg').'; }';
		$css .= '#boxplus .boxplus-controls div {background-color:'.$gantry->get('mainbg').';}';
		$css .= '#boxplus .boxplus-controls div:hover {background-color:'.$gantry->get('secbg').';}';
		$css .= "#logo .rt-block {padding:".$gantry->get('logopadding')."}";
		$css .= '#jscolor ul li {background-color:'.$gantry->get('mainbg').';}';
		$css .= '#rt-utility h2.title {color:'.$gantry->get('mainbg').';}';	
		$css .= '';
		
		
        $gantry->addInlineStyle($css);

        //style stuff
        //$gantry->addStyle($gantry->get('cssstyle').".css");
	}

}